<%--
  Created by IntelliJ IDEA.
  User: peipei
  Date: 2022/9/6
  Time: 14:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../views/common.jsp"%>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table id="demo" lay-filter="test"></table>
</body>
<script>
    layui.use(['table', 'jquery','form'], function () {
        var $ = layui.jquery,
            table = layui.table,
            form = layui.form;
        //第一个实例
        var myTable = table.render({
            elem: '#demo'
            , height: 480
            , url: '${pageContext.request.contextPath}/log/queryAllByPage.do' //数据接口
            , page: true
            , limit: 10
            , limits: [5, 10, 15, 20, 25, 30, 50, 100]
            , cols: [
                [ //表头
                    {field: 'id', title: 'ID', width: 120, sort: true}
                    , {field: 'userName', title: '用户名', width: 120, sort: true}
                    , {field: 'ip', title: 'IP', width: 120, sort: true}
                    , {field: 'className', title: '类名', width: 170, sort: true}
                    , {field: 'methodName', title: '方法名', width: 170}
                    , {field: 'params', title: '参数', width: 170}
                    , {field: 'createTime', title: '创建时间', width: 170}
                ]
            ]

        });
    })
</script>
</html>
